#ifndef OBSTACULO_H_
#define OBSTACULO_H_


#include <iostream>
#include "string.h"
#include "PuntoDeGrilla.h"
using namespace std;

class Obstaculo : public PuntoDeGrilla  {

private:

	string tipo;

public:

	/****CONSTRUCTORES****/

	Obstaculo(int f, int c, string t) : PuntoDeGrilla(f,c){
		this->tipo = t;
		this->setNombreClase("Obstaculo");
	}

	Obstaculo() : PuntoDeGrilla(0,0){
		this->tipo = "";
		this->setNombreClase("Obstaculo");
	}
	
	/****GETERS****/

	unsigned int getFila(){
		return this->fila;
	}

	unsigned int getColumna(){
		return this->columna;
	}
	
	string getTipo(){
		return this->tipo;
	}
	
	/****SETERS****/

	void setFila(int f){
		this->fila = f;
	}
	
	void setColumna(int c){
		this->columna = c;
	}

	void setTipo(string t){
		this->tipo = t;
	}

	void agregarAtributo(string n, string v) {
		if(n=="fila"){
			this->setFila(atoi(v.c_str()));
		} else if(n=="columna"){
			this->setColumna(atoi(v.c_str()));
		} else if(n=="tipo"){
			this->setTipo(v);
		} else {
			throw new AtributoDesconocidoException();
		}
	}

};

#endif 